/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package threadmatriz;

/**
 *
 * @author G0006185
 */
public final class Matriz implements Runnable {
    private double a[][];
    private double b[][];
    private double c[][];
    private int n,mi,mf;

    public void setMi(int mi) {
        this.mi = mi;
    }

    public void setMf(int mf) {
        this.mf = mf;
    }

    public Matriz(double[][] a, double[][] b, double[][] c, int n) {
        this.a = a;
        this.b = b;
        this.c = c;
        this.n = n;
    }
    
    

    @Override
    public void run() {
       multMatriz(a,b,c,n,mi,mf);
        
    }
    public void multMatriz(double a[][], double b[][], double c[][],int n,int mi,int mf){
        for (int i = 0; i < n; i++)
            for (int j = mi; j < mf; j++) 
                for (int k = 0; k < n; k++) 
                    c[i][j] += a[i][k]*b[k][j];       
    }  
}


